using Spine.Unity;
using System;
using UnityEngine;

namespace PKGames
{
	public class TransitionController : MonoBehaviour
	{
		[SerializeField]
		private SkeletonAnimation _skeletonAnimation;

		[SerializeField]
		[SpineAnimation("", "", true, false)]
		private string _inAnimation;

		[SerializeField]
		[SpineAnimation("", "", true, false)]
		private string _outAnimation;

		public void PlayInAnimation(Action completeCallback)
		{
			_skeletonAnimation.PlayAnimation(0, _inAnimation, loop: false, completeCallback);
		}

		public void PlayOutAnimation(Action completeCallback)
		{
			_skeletonAnimation.PlayAnimation(0, _outAnimation, loop: false, completeCallback);
		}
	}
}
